package com.sjgtw.cloud.web.freezeInjuryPlan.service.impl;

import java.util.List;

import com.sjgtw.cloud.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sjgtw.cloud.web.freezeInjuryPlan.mapper.FreezeInjuryPlanMapper;
import com.sjgtw.cloud.web.freezeInjuryPlan.domain.FreezeInjuryPlan;
import com.sjgtw.cloud.web.freezeInjuryPlan.service.IFreezeInjuryPlanService;

/**
 * 应急处置方案Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-16
 */
@Service
public class FreezeInjuryPlanServiceImpl implements IFreezeInjuryPlanService 
{
    @Autowired
    private FreezeInjuryPlanMapper freezeInjuryPlanMapper;

    /**
     * 查询应急处置方案
     * 
     * @param id 应急处置方案主键
     * @return 应急处置方案
     */
    @Override
    public FreezeInjuryPlan selectFreezeInjuryPlanById(Long id)
    {
        return freezeInjuryPlanMapper.selectFreezeInjuryPlanById(id);
    }

    /**
     * 查询应急处置方案列表
     * 
     * @param freezeInjuryPlan 应急处置方案
     * @return 应急处置方案
     */
    @Override
    public List<FreezeInjuryPlan> selectFreezeInjuryPlanList(FreezeInjuryPlan freezeInjuryPlan)
    {
        return freezeInjuryPlanMapper.selectFreezeInjuryPlanList(freezeInjuryPlan);
    }

    /**
     * 新增应急处置方案
     * 
     * @param freezeInjuryPlan 应急处置方案
     * @return 结果
     */
    @Override
    public int insertFreezeInjuryPlan(FreezeInjuryPlan freezeInjuryPlan)
    {
        freezeInjuryPlan.setCreateTime(DateUtils.getNowDate());
        return freezeInjuryPlanMapper.insertFreezeInjuryPlan(freezeInjuryPlan);
    }

    /**
     * 修改应急处置方案
     * 
     * @param freezeInjuryPlan 应急处置方案
     * @return 结果
     */
    @Override
    public int updateFreezeInjuryPlan(FreezeInjuryPlan freezeInjuryPlan)
    {
        freezeInjuryPlan.setUpdateTime(DateUtils.getNowDate());
        return freezeInjuryPlanMapper.updateFreezeInjuryPlan(freezeInjuryPlan);
    }

    /**
     * 批量删除应急处置方案
     * 
     * @param ids 需要删除的应急处置方案主键
     * @return 结果
     */
    @Override
    public int deleteFreezeInjuryPlanByIds(Long[] ids)
    {
        return freezeInjuryPlanMapper.deleteFreezeInjuryPlanByIds(ids);
    }

    /**
     * 删除应急处置方案信息
     * 
     * @param id 应急处置方案主键
     * @return 结果
     */
    @Override
    public int deleteFreezeInjuryPlanById(Long id)
    {
        return freezeInjuryPlanMapper.deleteFreezeInjuryPlanById(id);
    }
}
